home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- INPUT.EXE 1.5
- Copyright 1991 by Chuck Steenburgh
-
- If you use batch files very often, you've probably acquired
- a program called ASK.COM or QUERY.COM or something similar
- that allows you to ask questions and receive simple respones.
- Usually, this involves typing an ECHO command with your
- question, followed by ASK.COM or whatever. If you do this
- alot, you will probably appreciate the fact the INPUT.EXE
- will accomplish the jobs of both the ECHO and ASK commands.
- Add to this the greater flexibility that INPUT.EXE offers
- in presenting your prompt to the user and in receiving input,
- and you'll be sold.
-
- Usage: INPUT ["prompt"] [color] [/C] [/I] [/S] [/Y | /N] [/Pd] |
-
- "prompt" Enter the text you would like to
- appear to prompt the user for
- input. This can be up to 59 char-
- acters and must be enclosed in
- quotation marks.
-
- color Enter a number representing the
- color in which you want your mes-
- sage to appear. You must, of
- course, have a color monitor and
- card. See Appendix 3.
-
- /C Include this switch if you want
- your prompt message centered on
- the current line. If you include
- this switch, you MUST include a
- color value.
-
- /I Use this for a case-insensitive error
- level return. If this switch is
- included on the command line, pressing
- a letter a-z (lower case) will return
- the same value as if the corresponding
- key A-Z (upper case) were pressed.
-
- /S Show keypress. Adding this switch
- will cause INPUT to display the
- errorlevel value returned. Use this
- for quick "debugging" of your use
- of INPUT.EXE
-
- /Y Use this for a yes-no only response.
- If the "n" key is pressed, errorlevel
- of "0" is returned; pressing any other
- key returns an errorlevel of 1. The
- prompt "(Y/n)" is appended to the nor-
- mal prompt specified by the user.
-
- Page 1
-
-
-
-
-
-
- /N Use this for a yes-no only response.
- If the "y" key is pressed, errorlevel
- of "1" is returned; pressing any other
- key returns an errorlevel of 0. The
- prompt "(y/N)" is appended to the nor-
- mal prompt specified by the user.
- This switch takes precedence over the
- /y switch.
-
- /Pd Pause 10 seconds for user input, then |
- default to "d" (where "d" is any char-|
- acter. INPUT will wait up 10 seconds |
- for user input. If no key is pressed |
- within 10 seconds, INPUT will act as |
- if the key specified by the key rep- |
- resented by the single character "d" |
- was pressed. Note that all other |
- switches (case insensitivity, yes/no |
- answer, etc.) remain active if time |
- expires and the default key is used. |
- INPUT adds a warning that it will de- |
- fault to the specified value after 10 |
- seconds, and will display a succession|
- of ten dots to indicate elapsed time. |
-
- The command line parameters may be entered in any
- order, may be in any case, and may be preceded by
- either the "/" or "-" character.
-
- Examples:
-
- INPUT "Select a number from one to 10"
-
- This prints the text "Select on number from one to 10"
- on the current line and waits for a keypress.
-
- INPUT "Press any key to continue" 79
-
- This prints the text "Press any key to continue" on the
- current line in bright white on a red background and waits
- for a keypress.
-
- INPUT "Press the space bar to exit" 143 /c
-
- This prints the text "Press the space bar to exit" cen-
- tered on the current line in flashing bright white on a black
- background.
-
- INPUT /s /i "Press any key..." /c 14
-
- Prompts user with "Press any key..." in yellow on black.
- Returns a case-insensitive errorlevel and displays it on the
- screen before terminating.
-
- Page 2
-
-
-
-
-
-
- INPUT "Do you wish to continue?" /s 79 /y
-
- Prompts user with "Do you wish to continue? (Y/n)" in
- white on red. Returns errorlevel of 1 unless the "n" key is
- pressed. Displays errorlevel on screen.
-
- INPUT "Press any key..." /pf |
-
- Prompts user with "Press any key... (defaults to f after |
- 10 seconds)" in black on white. Returns errorlevel of 102 if |
- no key is pressed within 10 seconds, otherwise returns value of |
- key pressed.
-
- INPUT "Press any key..." /c /pf |
-
- Prompts user with "Press any key... (defaults to f after |
- 10 seconds)" in black on white. Returns errorlevel of 70 if no |
- key is pressed within 10 seconds, otherwise returns the upper |
- case ASCII value of the key pressed. |
-
- INPUT will also sound an alarm to let the user know that
- a response is expected.
-
- When a key is pressed, INPUT will set the errorlevel equal
- to the ASCII value of the key pressed. This is slightly dif-
- ferent from BATBOX in that in normal operation INPUT is case
- sensitive and will allow you to distinguish between upper and
- lower case letters. If you want a case-insensitive return, use
- the /i switch. See Appendix 2 for a complete list of the ASCII
- characters theoretically supported by INPUT.
-
- If you want greater control over the placement of your prompt
- message on the screen, use WRITE in conjunction with INPUT.
- Use WRITE to display your prompt then use INPUT without the
- "prompt," color, or /c parameters.
-
-
- INPUT is part of STEENBURGH'S STUFF Mildly Useful Utilities.
- STEENBURGH'S STUFF includes the following programs:
-
- BATBOX: Simple menu creation/input system
- CLK: Displays time on screen
- FREEDISK: Checks for available disk space
- INPUT: Simple prompt/input system
- KLS: Colorful screen-clearing utility
- LAUNCHER: File selection/execution system
- MUSIC: Plays transcribed sheet music on the PC
- RAND: Random number generator
- SKIP: Prints blank lines from batch files
- SOUNDER: Wide range of noise making options
- WAITFOR: Timed pauses
- WHENISIT: Date/time telling utility
- WRITE: Colorful output anywhere on screen
-
- Page 3
-
-
-
-
-
- XD: Create/switch directories at the same time
-
- The current version of STEENBURGH'S STUFF is 1.5, and can
- be found on many BBS's as STUF15.ZIP (earlier versions include
- STUF14.ZIP, STUF13.ZIP, etc.). It can also be found on Compu-
- Serve in the IBMSYS libraries.
-
- DISCLAIMER
-
- The programs described in this documentation are guaran-
- teed to absolutely nothing! They have, however, in my exper-
- ience performed essentially as described herein. The author
- will not be responsible for any loss or damages caused through
- the use of these programs.
-
- All trademarks are property of their respective owners.
-
- The programs and documentation are Copyright 1991 by Chuck
- Steenburgh. You are encouraged to distribute these programs
- provided the following conditions are met:
-
- - all files contained in this archive must be distrib-
- uted together in UNMODIFIED form
-
- - you charge no more than a reasonable fee for copying or
- subscription, and clearly indicate that payment of such
- a fee does NOT grant ownership of the programs.
-
- You may evaluate these programs for up to 30 days on a free
- trial basis. After 30 days, you should register your use of
- these programs. The registration fee is $10, payable to the
- author at the address given below. This registration fee in-
- cludes registration of ALL the programs described above as
- part of STEENBURGH'S STUFF.
-
- Let's be real: I don't plan to make alot of money this way.
- Registration does have its advantages:
-
- - I am improving these programs all the time. Registration
- will get you IMMEDIATELY a disk with the latest version,
- which includes a version of BATBOX with user-selected
- menu colors. When Version 2.0 of these utilities is re-
- leased, you will also receive that free of charge.
-
- - While I can't promise to include everyone's suggestions
- in program updates, you can bet I'll listen to registered
- users before any of you scrounges out there.
-
- - You will me feel all warm and fuzzy and appreciated, and
- all that good stuff.
-
- - You will also get an evaluation copy of my text-file for-
- matting program (used to produce the margins in this doc-
- ument).
-
- Page 4
-
-
-
-
-
-
- Send comments/registrations to:
-
- Chuck Steenburgh
- 304A North Main Street
- Lexington, VA 24450
- (703)464-5290
-
- CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 5